import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterOutlet } from '@angular/router';

import axios from 'axios';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [CommonModule, RouterOutlet],
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.less'] // 导入样式css
})
export class AppComponent {
  constructor() {
    this.getaaa()
  }
  title = 'ngbook963';
  radioValue = false;
  radioValue2 = '11';
  projectList: any = []
  getaaa () {
    console.log(11111111)
    // alert(12)
    this.title = '测试ng'
    axios.get("/api/list").then((res) => {
      console.log("res---自己写后台", res.data);
      this.projectList = res.data as any; // 跟vue写法一样
    });
  }
  handlerclick() {
    alert('sdd')
  }
  tap(title: any){
    console.log(title, 963)
    this.radioValue = !this.radioValue
  }
  shows(item: any) {
    alert(item.display_name)
  }
}
